package org.cupk2.base.domain;

import lombok.Data;
import org.cupk2.tools.db.commons.CupkUUID;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 用于權限系統緩存的user對象
 */
@Data
public class CupkUserContext implements Serializable {
    private String loginname;
    private String password;
    private String name;
    private String loginid;
    private String state;
    private String type;
    private String ip;
    private List<String> actions = new ArrayList<>();
    private List<String> tags = new ArrayList<>();

    private int frameMenuNum;

    public String initLoginid() {
        loginid = CupkUUID.getUUID32();
        return loginid;
    }
}
